import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/components/Home'

import PageNotFound from '@/components/plugins/not-found'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'HomePage',
      component: () =>
        import('@/components/Home/Index')
    },
    {
      path: '/show',
      name: 'Show',
      component: Home,
      redirect: {
        name: 'ShowList'
      },
      children: [
        {
          path: 'list',
          name: 'ShowList',
          component: () =>
            import('@/components/Show/List')
        },
        {
          path: 'create',
          name: 'ShowCreate',
          component: () =>
            import('@/components/Show/Create')
        }
      ]
    },
    {
      path: '*',
      name: 'NotFound',
      component: PageNotFound
    }
  ]
})
